<?php
//获取当前user信息
$userCooker = new BAUserCooker();
$userInfo = $userCooker->getUserInfo();
//var_dump($userInfo);
$familyNameAttr = '';
$surNameAttr = '';
if($userInfo->getItem('familyName') != NULL)
    $familyNameAttr = $userInfo->getItem('familyName')->getValue();
if($userInfo->getItem('surName') != NULL)
    $surNameAttr = $userInfo->getItem('surName')->getValue();
?>
<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl.'/css/BWeMember/wei_webapp_new.css'?>">
<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl.'/css/BWeMember/wei_dialog.css'?>">
<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl.'/css/BWeMember/common.css'?>">

<!-- ajax加载页面时弹出加载旋转gif图 -->
<style>
    #ajax-loaderdiv {position: fixed;top: 0;left: 0;width: 100%;height: 100%;z-index: 35000;background-color: rgba(0, 0, 0, 0.3);display: none;}
    .ajax-loader {position: absolute;left: 50%;top: 50%;margin-left: -16px;margin-top: -16px;display: block;}
</style>
<div id="ajax-loaderdiv" style="display: none;">
    <img src="<?php echo Yii::app()->request->baseUrl.'/images/ajax-loader.gif'?>" class="ajax-loader">
</div>


<div id="page_card" class="div-body">

    <div id="mappContainer">
        <div class="inner root" style="height: 519px;">
            <div class="card" style="background:url(<?php echo Yii::app()->request->baseUrl.'/images/BWeMember/wei_webapp_new/card_bk_1.png'?>) no-repeat 0 0;-webkit-background-size:267px 159px;background-size:267px 159px;" data-card-type="0">
                <img src="<?php echo Yii::app()->request->baseUrl.'/images/BWeMember/weixin_shop_logo/2543529110_card_170_170.png'?>" class="logo">
                <h1></h1>
                <strong class="pdo verify">
                    <span style="color:#92714e;text-shadow:0 1px #f1e7dc;"><em style="color:#92714e;text-shadow:0 1px #f1e7dc;">会员名</em><?php echo $familyNameAttr.$surNameAttr;?></span>
                </strong>
            </div>
            <p><span>会员卡类型列表</span></p>
            <?php
            $cardCooker = new BAMemberCardCooker();
            foreach ($memberCardTypeList as $id => $type) {
                $typeName = $type['name'];
                $typeAlias = $type['alias'];
                ?>
                <ul class="round" id="customs">
                     <li> <?php echo $typeAlias; ?> 
                         <span style="float: right;">
                             <?php 
                            echo $control->getAjaxLink('我的卡', array(
                                'cooker' => 'BAMemberCard@showUserCardList',
                                'memberCardTypeId' => $id,
                            ));
                             ?>
                         </span>
                     </li>
              </ul>
            <?php } ?>
                <?php
                echo $control->getAjaxLink('返回', array(
                    'cooker' => 'BAMemberCard@showUserCardHome',
                    'htmlOptions' => array('class' => 'btn btn-primary','style'=>'width: 100%;')
                ));
                ?>
        </div>
    </div>

    <div id="mCopyright">
        <div class="mcrInn">
            <h1>比邻平台</h1>
        </div>
    </div>

</div>
